package com.youku.controller;

import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.youku.model.LogModel;
import com.youku.model.ResponseBody;
import com.youku.util.JCSClient;

@RestController
public class LogController {

	@RequestMapping("/{action}/{key}")
	public ResponseBody searchLog(@PathVariable String action, @PathVariable String key) {
		List<LogModel> models = JCSClient.get(action, key);
		return ResponseBody.createResponse(models);
	}

	@RequestMapping("/cache")
	public String listAll() {
		return JCSClient.listAll();
	}

}
